package com.easy.framework.common.constant;


/**
 * 通用常量信息
 *
 * @author Easy
 */
public interface Constants {
    /**
     * UTF-8 字符集
     */
    String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    String GBK = "GBK";

    /**
     * www主域
     */
    String WWW = "www.";

    /**
     * http请求
     */
    String HTTP = "http://";

    /**
     * https请求
     */
    String HTTPS = "https://";

    /**
     * 定时任务白名单配置（仅允许访问的包名，如其他需要可以自行添加）
     */
    String[] JOB_WHITELIST_STR = {"com.easy"};

    /**
     * 定时任务违规的字符
     */
    String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
            "org.springframework", "org.apache", "com.easy.common.utils.file", "com.easy.common.config"};

    /**
     * redis key 前缀
     */
    String CACHE = "easy_admin:";


    /**
     * 验证码 redis key
     */
    String CAPTCHA_CODE_KEY = CACHE + "captcha_key:";

    /**
     * 参数管理 cache key
     */
    String SYS_CONFIG_KEY = CACHE + "sys_conf:";

    /**
     * 字典管理 cache key
     */
    String SYS_DICT_KEY = CACHE + "sys_dict:";

    /**
     * 防重提交 redis key
     */
    String REPEAT_SUBMIT_KEY = CACHE + "repeat_submit:";

    /**
     * 限流 redis key
     */
    String RATE_LIMIT_KEY = CACHE + "rate_limit:";

    /**
     * 登录账户密码错误次数 redis key
     */
    String LOGIN_FAIL_COUNT_KEY = CACHE + "login_fail_count:";


    String ALL_PERMISSION = "*:*:*";

    String SUPER_ADMIN = "admin";

    /**
     * Layout组件标识
     */
    String LAYOUT = "Layout";

    /**
     * ParentView组件标识
     */
    String PARENT_VIEW = "ParentView";

    /**
     * InnerLink组件标识
     */
    String INNER_LINK = "InnerLink";

    /**
     * 菜单树根节点
     */
    Long TREE_ROOT_ID = 0L;


    String AUTHORIZATION_KEY = CACHE + "oauth2:authorization:";

    String ACCESS_TOKEN_KEY = CACHE + "oauth2:access_token:";

    String REFRESH_TOKEN_KEY = CACHE + "oauth2:refresh_token:";

    String AUTHORIZATION_CONSENT_KEY = CACHE + "oauth2:authorization_consent:";

    String AUTHORIZATION_GRANT_TYPE_PASSKEY = "passkey";

    String MAIL_QQ = "qq";

    String MAIL_163 = "163";

    String MAIL_GMAIL = "gmail";


}
